<?
 require_once("./address.php");
 
 
 if(isset($_POST['createAddress']))
 {
 	if($_POST['createAddress'] === '1')
	{
		$results = addAddress($_POST);
		
		header("location:../users/edit.php?id=$_POST[Customer_Name_id1]");
	}
 }
 
 if(isset($_GET['addressid']))
 {
 	if($_GET['addressid'])
 	{
 		$results = delAddress($_GET['addressid']);
	
		header("location:../users/edit.php?id=$_GET[id]");
 	}
 }
 
 if(isset($_POST['UpdateAddress']))
 {
 	if($_POST['UpdateAddress'] === '1')
	{	
		$results = updateAddress($_POST);
		
		header("location:../users/edit.php?id=$_POST[Customer_Name_id1]");
	}
 }

?>